/*
 * @version: 1.0
 * @Author: zhl
 * @Date: 2021-10-19 11:53:05
 * @LastEditors: zhl
 * @LastEditTime: 2022-02-08 11:33:43
 * @Description: 文件实现描述
 */

#include <stdio.h>
#include <string.h>

#include "ModbusMessageManager.h"
#include "modbus_main.h"
#include "modbus.h"


char *get_module_name(){

    return (char *)"1";//"modbus";
}
/**
 * @brief 处理modbus业务逻辑
 * 
 * @param cm           - 配置信息
 * @param sp_ptr       - 串口代理(同步处理串口请求与接收)
 * @param mm           - mqtt通信对象指针
 * @param dev          - 设备包含的请求信息请求信息
 * @return int 
 */
int run(std::shared_ptr<CConfigManager> cm, std::shared_ptr<IChannel> channel_ptr, std::shared_ptr<CMosquittoManager> mm, IModule &im, std::shared_ptr<TASK_PARAMS> dev){
    return MessageManager::getInstance().run(cm, channel_ptr.get(), mm, im, dev.get());
}